{% extends "sil29VitrineBundle::layout.html.twig" %} {% block content %}
<div class="span9">

	<ul class="breadcrumb">
		<li><a href="{{ path('sil29_vitrine_homepage') }}">Accueil</a> <span class="divider">/</span></li>
		<li class="active">{{ categorie.nomCategorie }}</li>
	</ul>
	<h3>
		{{ categorie.nomCategorie }} <small class="pull-right"> {{ listeRepas | length }}  produits disponibles  </small>
	</h3>
	<hr class="soft" />
	<p>{{ categorie.descriptif }}</p>
	<hr class="soft" />
	
	{% if listeRepas | length == 0 %}
	<div class="alert alert-error">
	   Désolé on a rien dans le frigo qui correspond.
	</div>
	{% else %}
	<form class="form-horizontal span6">
		<div class="control-group">
			<label class="control-label alignL">Trier par </label> <select>
				<option>Nom de produt A - Z</option>
				<option>Nom de produit Z - A</option>
				<option>Prix minimal d'abord</option>
			</select>
		</div>
	</form>

	<div id="myTab" class="pull-right">
		<a href="#listView" data-toggle="tab"><span class="btn btn-large"><i
				class="icon-list"></i></span></a> <a href="#blockView"
			data-toggle="tab"><span class="btn btn-large btn-primary"><i
				class="icon-th-large"></i></span></a>
	</div>
	<br class="clr" />
	<div class="tab-content">
		<div class="tab-pane" id="listView">


			{% for repas in listeRepas %}
			<div class="row">
				<div class="span2">
					<img
						src="{{asset('bundles/sil29vitrine/images/'~ repas.imageSrc)}}"
						alt="" />
				</div>
				<div class="span4">
					<h3></h3>
					<hr class="soft" />
					<h5>{{ repas.nom }}</h5>
					<p>{{ repas.description }}</p>
					<a class="btn btn-small pull-right" href="product_details.html">Voir détail</a> <br class="clr" />
				</div>


				<div class="span3 alignR">
					<form class="form-horizontal qtyFrm">
						<h3>{{ repas.prix }} €</h3><br /> <a
							href="{{ path('sil29_vitrine_ajoutArticle', {'idElementFacturable' : repas.id}) }}"
							class="btn btn-large btn-primary"> Ajouter <i
							class=" icon-shopping-cart"></i></a> <a
							href="product_details.html" class="btn btn-large"><i
							class="icon-zoom-in"></i></a>

					</form>
				</div>
			</div>
			<hr class="soft" />
			{% endfor %}
		</div>
		<div class="tab-pane  active" id="blockView">
			<ul class="thumbnails">
				{% for repas in listeRepas %}
				<li class="span3">
					<div class="thumbnail">
						<a href="product_details.html"><img
							src="{{asset('bundles/sil29vitrine/images/'~ repas.imageSrc)}}"
							alt="" height="100px" width="100px" /></a>
						<div class="caption">
							<h5>{{ repas.nom }}</h5>
							<p>{{ repas.description }}</p>
							<h4 style="text-align: center">
								<a class="btn" href="product_details.html"> <i
									class="icon-zoom-in"></i></a> <a class="btn"
									href="{{ path('sil29_vitrine_ajoutArticle', {'idElementFacturable' : repas.id}) }}">Add
									to <i class="icon-shopping-cart"></i>
								</a> <a class="btn btn-primary" href="#">{{ repas.prix }} €</a>
							</h4>
						</div>
					</div>
				</li> {% endfor %}
			</ul>
			<hr class="soft" />
		</div>
	</div>

	<br class="clr" />
	{% endif %}
</div>
</div>
{% endblock %}
